import http from "./request";

async function login(params) {
  let { data } = await http.post(
    `/user/m/login?deviceId=007&deviceName=monkey&mobile=${params.username}&pwd=${params.password}`
  );
  return data;
}
//登陆的请求方法

async function getSms(params) {
  let { data } = await http.post(
    `/verification/sms/get?mobile=${params.mobile}&key=${params.key}&picCode=${params.picCode}`
  );
  return data;
}
//获取短信验证码的接口

async function yxResigister(params) {
  let { data } = await http.post(
    `/user/m/register?mobile=${params.mobile}&pwd=${params.pwd}&code=${params.code}&nick=${params.nick}&province=${params.province}&city=${params.city}`
  );
  return data;
}

export { login, getSms, yxResigister };
